<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // break 结束当前循环
        // continue 结束本次循环执行下次循环

        let sun = 0;
        let i = 1;
        while (i <= 100) {
            sun += i;
            i++;
        }
        console.log(sun);



        let num = 0;
        let j = 1;
        do {
            num += j;
            //    console.log('11');
            j++;
        } while (j <= 100);
        console.log(num
        );
    </script>
</body>

</html>